package com.hdl.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 类名 User
 * 描述 用户实体
 *
 * @author hedonglin
 * @version 1.0
 * @date 2020/4/22 19:46
 */
public class User implements Serializable {
    private Integer id;
    private String username;
    private String password;
    private String birthday;

    /**
     * 表示用户关联的订单
     */
    private List<Order> orders =  new ArrayList<>();

    /**
     * 表示用户关联的角色
     */
    private List<Role> roles = new ArrayList<>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }


    public List<Order> getOrders() {
        return orders;
    }

    public void setOrders(List<Order> orders) {
        this.orders = orders;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", birthday='" + birthday + '\'' +
                ", orders=" + orders +
                ", roles=" + roles +
                '}';
    }
}
